package com.genokon.consumer.fallback;

import com.genokon.consumer.service.EchoService;

/**
 * @author by baichaoda
 * @date 2020/7/28 14:33
 */
public class EchoServiceFallbackImpl implements EchoService {
    private final Throwable throwable;

    EchoServiceFallbackImpl(Throwable throwable){
        this.throwable = throwable;
    }

    @Override
    public String echo(String str) {
        return "consumer-fallback-default-str: " + throwable.getMessage();
    }

    @Override
    public String divide(Integer a, Integer b) {
        return null;
    }
}
